Beat-morphology matching scheme for cardiac sensing and event detection

ABSTRACT

A medical device and associated method for classifying an unknown cardiac signal operate to sense a cardiac signal over known cardiac cycles and generate a template of the known cardiac cycles. An unknown cardiac signal is sensed over an unknown cardiac cycle. A template alignment point and an unknown cardiac signal alignment point are identified by using a fourth order difference signal. The template and the unknown cardiac signal are aligned across an alignment window by aligning the template alignment point and the unknown cardiac signal alignment point. A morphology match metric measuring a similarity between the aligned template and the unknown cardiac signal is computed.

CROSS-REFERENCE TO RELATED APPLICATION

Cross-reference is hereby made to the commonly-assigned related U.S.application Ser. Nos. ______ (Attorney Docket Number C00005145.USU2) and(Attorney Docket Number C00005145.USU3), both entitled “ABEAT-MORPHOLOGY MATCHING SCHEME FOR CARDIAC SENSING AND EVENTDETECTION,” to Zhang, both filed concurrently herewith and bothincorporated herein by reference in it's entirety.

TECHNICAL FIELD

The disclosure relates generally to implantable medical devices and, inparticular, to an apparatus and method for performing a matching schemefor comparing cardiac sensed waveforms to a known template.

BACKGROUND

Implantable cardioverter defibrillators (ICDs) often have the capabilityof providing a variety of anti-tachycardia pacing (ATP) regimens as wellas cardioversion/defibrillation shock therapy. Normally, arrhythmiatherapies are applied according to a pre-programmed sequence of lessaggressive to more aggressive therapies depending on the type ofarrhythmia detected. Typically, termination of an arrhythmia isconfirmed by a return to either a demand-paced rhythm or a sinus rhythmin which successive spontaneous R-waves are separated by at least adefined interval. When ATP attempts fail to terminate the tachycardia,high-voltage cardioversion shocks may be delivered. Since shocks can bepainful to the patient and consume relatively greater battery chargethan pacing pulses, it is desirable to avoid the need to deliver shocksby successfully terminating the tachycardia using less aggressive pacingtherapies when possible. Whenever necessary, however, life-saving shocktherapies need to be delivered promptly in response to tachyarrhythmiadetection.

The success of a tachycardia therapy depends in part on the accuracy ofthe tachycardia detection. In some cases, a tachycardia originating inthe atria, i.e. a supraventricular tachycardia (SVT), is difficult todistinguish from a tachycardia originating in the ventricles, i.e. aventricular tachycardia (VT). For example, both the atrial chambers andthe ventricular chambers may exhibit a similar tachycardia cycle lengthwhen an SVT is conducted to the ventricles or when a VT is conductedretrograde to the atria. Accordingly, methods are needed for accuratelyclassifying a detected tachycardia as VT or SVT to allow the mostappropriate therapy to be delivered by the ICD, with the highestlikelihood of success and without unacceptably delaying attempts atterminating the tachycardia.

Tachyarrhythmia detection may begin with detecting a fast ventricularrate, referred to as a rate- or interval-based detection. Before atherapy decision is made, tachyarrhythmia detection may further requirediscrimination between SVT and VT using cardiac signal waveformmorphology analysis, particularly when a fast 1:1 atrial to ventricularrate is being sensed. Among the factors affecting the sensitivity andspecificity of a morphology waveform matching scheme are the methodsused to align an unknown signal waveform and a known waveform template,the number of sample data points used to compare the unknown and knownwaveforms, and the matching analysis performed on the aligned, selectedsample data points. A need remains for an apparatus and method forproviding reliable cardiac beat morphology matching schemes for cardiacevent detection.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 and FIG. 2 are schematic diagrams of an implantable medicaldevice (IMD) in which methods described herein may be usefullypracticed.

FIG. 3 is a functional block diagram of electronic circuitry that isincluded in one embodiment of IMD 14 shown in FIG. 1 for practicing themethods described herein.

FIG. 4 is a flow chart of a method for establishing a morphologytemplate according to one embodiment.

FIG. 5 is example recordings of ECG signal waveforms aligned using twodifferent techniques.

FIG. 6 is a flow chart of a method for aligning an ECG signal of anunknown beat with a known morphology template.

FIG. 7 is a flow chart of a method for computing a morphology metric todetermine the similarity between a known template aligned with anunknown cardiac cycle signal according to one embodiment.

FIG. 8 is a plot of an aligned unknown signal and template illustratinga technique for computing a normalized waveform area difference (NWAD)according to one embodiment.

FIG. 9 is a plot of an unknown fourth order difference signal alignedwith a fourth order difference template illustrating a technique fordetermining an R-wave width and computing a NWAD according to anotherembodiment.

DETAILED DESCRIPTION

An IMD, or other device, according to the present disclosure determinesthe morphology of a cardiac cycle signal corresponding to an unknownheart rhythm by determining the amount of morphological similaritybetween the cardiac cycle signal and a template having a knownmorphology corresponding to a known heart rhythm. The template may havethe morphology of a normal cardiac cycle, e.g., a cardiac cycle of anormal sinus heartbeat for a patient in which the IMD is implanted, oran averaged cardiac cycle based on a plurality of normal cardiac cycles.In some examples, a clinician may generate the template based on datareceived from the IMD, and then subsequently upload the generatedtemplate to the IMD. In other examples, the IMD may automaticallygenerate the template and periodically update the template duringoperation. Improved techniques are disclosed herein for generating atemplate, aligning the template with a cardiac cycle signal of anunknown beat, and computing a morphology matching metric of thesimilarity between the cardiac cycle signal and the template.

FIG. 1 and FIG. 2 are schematic diagrams of an IMD in which methodsdescribed herein may be usefully practiced. As illustrated in FIG. 1,IMD 14 according to one embodiment is subcutaneously implanted outsidethe ribcage of a patient 12, anterior to the cardiac notch. IMD 14includes a housing 15 to enclose electronic circuitry of the device 14.

A sensing and cardioversion/defibrillation therapy delivery lead 18 inelectrical communication with IMD 14 is tunneled subcutaneously into alocation adjacent to a portion of a latissimus dorsi muscle of patient12. Specifically, lead 18 is tunneled subcutaneously from a medianimplant pocket of IMD 14 laterally and posterially to the patient's backto a location opposite the heart such that the heart 16 is disposedbetween IMD 14 and a distal electrode coil 24 and a distal sensingelectrode 26 of lead 18.

Subcutaneous lead 18 includes a distal defibrillation coil electrode 24,a distal sensing electrode 26, an insulated flexible lead body and aproximal connector pin 27 (shown in FIG. 2) for connection tosubcutaneous device 14 via a connector 25. In addition, one or moreelectrodes 28A, 28B, 28C, collectively 28, (shown in FIG. 2) arepositioned along the outer surface of the housing to form ahousing-based subcutaneous electrode array (SEA). Distal sensingelectrode 26 is sized appropriately to match the sensing impedance ofthe housing-based subcutaneous electrode array. It is understood thatwhile IMD 14 is shown with electrodes 28 positioned on housing 15,electrodes 28 may be alternatively positioned along one or more separateleads connected to device 14 via connector 25. The lead and electrodeconfiguration shown in FIG. 1 is merely illustrative of one arrangementof electrodes that can be used for sensing subcutaneous ECG signals anddelivering cardioversion/defibrillation shocks. Numerous configurationsmay be contemplated that include one or more housing-based electrodesand/or one or more lead-based electrodes for enabling sensing of an ECGsignal using extra-vascular, extra-cardiac electrodes implanted beneaththe skin, muscle or other tissue layer within a patient's body.

Further referring to FIG. 1, a programmer 20 is shown in telemetriccommunication with IMD 14 by an RF communication link 22. Communicationlink 22 may be any appropriate RF link such as Bluetooth, WiFi, orMedical Implant Communication Service (MICS).

IMD 14 shown in FIGS. 1 and 2 is one illustrative embodiment of the typeof device that may be adapted for practicing methods described herein. Asubcutaneous IMD system is subject to muscle and other noise and motionartifact due to the subcutaneous placement of electrodes. The methodsdescribed herein are well-suited to address accurate cardiac eventdetection in a subcutaneous IMD system. IMD 14 and associated lead 18are referred to as a “subcutaneous IMD system” because lead 18 ispositioned in an extravascular location, subcutaneously. It isunderstood that while IMD 14 and lead 28 may be positioned between theskin and muscle layer of the patient, IMD 14 and any associated leadscould be positioned in any extravascular location of the patient, suchas below the muscle layer or within the thoracic cavity, for example.Furthermore, while illustrative embodiments of the techniques andmethods described herein relate to a subcutaneous IMD system, it iscontemplated that the disclosed techniques may be useful in other IMDsystems configured to detect cardiac arrhythmias utilizing electrodescarried along the IMD housing and/or leads extending therefrom, whichmay include transvenous and/or extravascular leads carrying anycombination of epicardial electrodes, endocardial electrodes orsubcutaneous electrodes, for example.

In the illustrative embodiments described herein, the disclosed methodsare described in conjunction with an IMD capable of delivering a therapyin response to tachyarrhythmia detection. In alternative embodiments,cardiac event detection methods described herein may be implemented in amonitoring device that does not include therapy delivery capabilities,such as an ECG recording device or an implantable cardiac hemodynamicmonitor.

FIG. 3 is a functional block diagram 100 of electronic circuitry that isincluded in one embodiment of IMD 14 shown in FIG. 1 for practicing themethods described herein. The IMD 14 includes electrical sensing module102, signal generator module 104, communication module 106, processingand control module 110 and associated memory 112, and a power source 108for powering each of the modules 102, 104, 106, 110 and memory 112.Power source 108 may include one or more energy storage devices, such asone or more primary or rechargeable batteries. As used herein, the term“module” refers to an application specific integrated circuit (ASIC), anelectronic circuit, a processor (shared, dedicated, or group) and memorythat execute one or more software or firmware programs, a combinationallogic circuit, or other suitable components that provide the describedfunctionality.

Modules included in IMD 14 represent functionality that may be includedin IMD 14 of the present disclosure. Modules of the present disclosuremay include any discrete and/or integrated electronic circuit componentsthat implement analog and/or digital circuits capable of producing thefunctions attributed to the modules herein. For example, the modules mayinclude analog circuits, e.g., amplification circuits, filteringcircuits, and/or other signal conditioning circuits. The modules mayalso include digital circuits, e.g., combinational or sequential logiccircuits, memory devices, etc. Memory may include any volatile,non-volatile, magnetic, or electrical non-transitory computer readablestorage media, such as a random access memory (RAM), read-only memory(ROM), non-volatile RAM (NVRAM), electrically-erasable programmable ROM(EEPROM), Flash memory, or any other memory device. Furthermore, memory112 may include non-transitory computer readable media storinginstructions that, when executed by one or more processing circuits,cause the modules to perform various functions attributed to the modulesherein. The non-transitory computer readable media storing theinstructions may include any of the media listed above, with the soleexception being a transitory propagating signal.

The functions attributed to the modules herein may be embodied as one ormore processors, hardware, firmware, software, or any combinationthereof. Depiction of different features as modules is intended tohighlight different functional aspects and does not necessarily implythat such modules must be realized by separate hardware or softwarecomponents. Rather, functionality associated with one or more modulesmay be performed by separate hardware or software components, orintegrated within common hardware or software components.

Processing and control module 110 communicates with signal generatormodule 104 and electrical sensing module 102 for sensing cardiacelectrical activity and generating cardiac therapies in response tosensed signals. Signal generator module 104 and electrical sensingmodule 102 are electrically coupled to subcutaneous SEA electrodes 28incorporated along but electrically insulated from IMD housing 15,lead-based electrodes 24 and 26 and housing 15, at least a portion ofwhich also serves as a common or ground electrode and is therefore alsoreferred to herein as “housing electrode” 15.

Electrical sensing module 102 is configured to monitor signals fromavailable electrodes 26 and 28 in order to monitor electrical activityof a patient's heart. Electrical sensing module 102 may selectivelymonitor any sensing vector selected from electrodes 26 and 28. Sensingmodule 102 may include switching circuitry for selecting which ofelectrodes 24, 26, 28 and housing electrode 15 are coupled to senseamplifiers included in sensing module 102. Switching circuitry mayinclude a switch array, switch matrix, multiplexer, or any other type ofswitching device suitable to selectively couple sense amplifiers toselected electrodes. Sensing vectors will typically be selected from SEAelectrodes 28 in combination with lead-based sensing electrode 26although it is recognized that in some embodiments sensing vectors maybe selected that utilize coil electrode 24 and/or housing electrode 15.

Processing and control 110 processes the subcutaneous ECG sense signalsreceived from sensing vectors selected from SEA 28 (FIG. 2) and sensingelectrode 26. Some aspects of sensing and processing subcutaneous ECGsignals are generally disclosed in commonly-assigned U.S. Pat. No.7,904,153 (Greenhut, et al.), hereby incorporated herein by reference inits entirety.

Electrical sensing module 102 may include signal conditioning circuits,e.g., amplification and filtering circuits that amplify and filtercardiac electrical signals received from electrodes 26 and 28.Electrical sensing module 102 includes analog-to-digital (ND) conversioncircuits that digitize the conditioned cardiac electrical signals. Thedigitized data generated by the ND circuits included in electricalsensing module 102 may be referred to as “raw data.” In some examples,the A/D circuits may include an 8-bit ND converter that samplesconditioned cardiac electrical signals at approximately 256 Hz. Sensingmodule 102 generates R-wave sense signals upon sensing an R-wave fromthe ECG signal, for example based on an auto-adjusted threshold crossingof the ECG signal. The timing of an R-wave sense signal is used byprocessing and control module 110 to measure R-R intervals and forselecting sample points buffered in memory for use in morphologymatching algorithms.

In some embodiments, sensing module 102 may include multiple sensingchannels having different sensing bandwidths. The different sensingchannels may be coupled to the same or different sensing electrodevectors selected from SEA electrodes 28 and lead-based sensing electrode26. In one embodiment, sensing module 102 includes a wide-band channelhaving a bandwidth of approximately 2.5 Hz to 95 Hz and a narrow-bandchannel having a sensing bandwidth between 2.5 Hz and 23 Hz. The wideband channel may be used for sensing R-waves and generating R-wave sensesignals. The narrow band channel may be used for providing digitized rawECG signals to processing module 110 for performing morphology analysis.Alternatively, the wide band channel or the narrow band channel may beused alone or in combination for performing the morphology analysis.

Processing module 110 receives raw data from electrical sensing module102 and detects cardiac tachyarrhythmias based on the raw data andprocessing thereof. Detection of a malignant tachyarrhythmia isdetermined by processing and control module 110 based on sensed cardiacevent signals determined from one or more selected ECG signals. R-wavesense event signals and a digitized ECG signal may be output fromsensing module 102 to processing and control module 110. Processing andcontrol module 110 performs tachyarrhythmia detection algorithms usingthe R-wave sense event signals and digitized ECG signal to detect atreatable heart rhythm. As further described below, a detectionalgorithm may use a combination of intervals measured betweensuccessively sensed R-waves (i.e. R-R intervals) and ECG waveformmorphology analysis for detecting and discriminating heart rhythms. Forexample, processing and control module 102 may detect tachyarrhythmiasusing a rate-based detection algorithm in which processing and controlmodule 102 monitors R-R intervals and identifies a tachyarrhythmia whena predetermined ratio of R-R intervals are shorter than a thresholdinterval.

When a fast heart rate is detected by the processing and control module110 based on sensed R-R intervals, processing and control module 110 maybe programmed to perform a morphology analysis to discriminate betweensupraventricular tachycardia (SVT) and VT or VF. The morphology analysisis generally based on comparison of data obtained from an ECG signal ofan unknown cardiac beat to a known cardiac beat template, e.g. a knownnormal sinus rhythm template. Accordingly, processing and control module110 is configured to generate a morphology template of a known beat andstore the template in memory 112.

As further described herein, processing and control module 110 operatesto determine a fourth order difference signal from the raw sensed ECGsignal received from sensing module 102. This fourth order differencesignal is determined as the difference between the amplitude of a givenECG signal sample point and the sample point occurring four samplingintervals earlier. The fourth order difference signal sample pointsderived from the ECG raw signal may be expressed as x(n+4)−x(n).

This fourth order difference signal is used to align an ECG signal froman unknown beat to a known template. The fourth order difference signalis further compared to the stored template to determine a similaritybetween the fourth order difference signal and the known template insome embodiments. The similarity is measured by a morphology matchingmetric which may be computed using a variety of techniques. In oneembodiment, a normalized waveform area difference (NWAD) is computedfrom the fourth order difference signals of an unknown beat and thetemplate. The unknown beat is classified as being either asupraventricular beat or a beat that is ventricular in origin inresponse to the morphology matching metric.

It should be noted that implemented tachyarrhythmia detection algorithmsmay utilize not only ECG signal analysis methods but may also utilizesupplemental sensors 114, such as tissue color, tissue oxygenation,respiration, patient activity, heart sounds, and the like, forcontributing to a decision by processing and control module 110 to applyor withhold a defibrillation therapy.

In response to detecting a treatable cardiac rhythm, processing andcontrol module 110 controls signal generator module 104 to generate anddeliver a cardioversion or defibrillation shock pulse to the patient'sheart via electrodes 24 and 15. Generally, a treatable rhythm isidentified as ventricular tachycardia (VT) or ventricular fibrillation(VF), which may be successfully terminated by a shock therapy. Atachycardia originating in the atria, i.e. a supraventriculartachycardia (SVT), is generally not treated by delivery of a shocktherapy by the IMD 14. As further described herein, a treatable rhythmis identified by using morphology analysis to discriminate between fastheart rhythms originating in the atria and fast heart rhythmsoriginating in the ventricles. This discrimination is performed bydetermining the similarity between an unknown cardiac signal and a knowntemplate. For example, an unknown cardiac signal or “beat” may beclassified as an SVT beat if the morphology matching metric exceeds amatching threshold when compared to a normal sinus rhythm template. Theunknown cardiac signal is classified as a VT/VF beat if the morphologymatching metric falls below a matching threshold.

Processing and control module 110 may control signal generator module104 to deliver a shock therapy using coil electrode 24 and housingelectrode 15 according to one or more therapy programs, which may bestored in memory 112. For example, processing and control module 110 maycontrol signal generator module 104 to deliver a shock pulse at a firstenergy level and increase the energy level upon redetection of a VT orVF rhythm. Shock pulse generation and control is further described inthe above incorporated '153 Greenhut patent.

Communication module 106 includes any suitable hardware, firmware,software or any combination thereof for communicating with anotherdevice, such as an external programmer 20 and/or a patient monitor.Under the control of processing module 110, communication module 106 mayreceive downlink telemetry from and send uplink telemetry to programmer20 and/or a patient monitor with the aid of an antenna (not shown) inIMD 14.

Processing and control module 102 may generate marker channel data basedon analysis of the raw data. The marker channel data may include datathat indicates the occurrence and timing of sensing, diagnosis, andtherapy events associated with IMD 14. Processing and control module 110may store the generated marker channel data in memory 112. Although notillustrated, in some examples, marker channel data may includeinformation regarding the performance or integrity of IMD 14, includingpower source 108 and lead 18.

Processing and control module 110 may store raw data and marker channeldata in memory 112. For example, processing and control module 110 maycontinuously store raw data from one or more electrode combinations inmemory 112 as the raw data is received from electrical sensing module102. In this manner, processing and control module 110 may use memory112 as a buffer to store a predetermined amount of raw data. In someexamples, processing and control module 110 may store raw datacorresponding to a predetermined number of cardiac cycles, e.g., 12cycles. In other examples, processing and control module 110 may store apredetermined number of samples of raw data, e.g., processing module 110may store raw data for a predetermined period of time.

Processing and control module 110 may perform analysis on the raw datastored in memory 112. For example, analysis may include deriving afourth order difference signal from the raw ECG signal for an unknowncardiac cycle, determining an alignment point of the fourth orderdifference signal for alignment with a previously established templateof a known beat type, aligning the unknown cardiac cycle signal usingthe alignment point with the template by shifting sample points to alignthe alignment point derived from the fourth order difference signal witha template alignment point, and computing a morphology match metric,e.g. a NWAD, of the aligned signal and template. The value of themorphology match metric is used to classify the beat as an SVT or aventricular beat corresponding to a ventricular tachyarrhthmia (VT orVF). A threshold number of VT/VF beats may be required for processor andcontrol module 110 to control signal generator 104 to generate anddeliver a shock pulse.

Processing and control module 110 may store a selected number of samplepoints before and after each R-wave sense signal received from sensingmodule 102 in a buffer in memory 112. For example, processing andcontrol module 110 may store approximately 26 data points before theR-wave sense signal and 26 data points after the R-wave sense signal foreach cardiac cycle. The 26 data points before and after the R-wave sensesignal defines an alignment window. The fourth order difference signalis determined from these buffered sample points across the alignmentwindow and these points are aligned with the template based on analignment point identified within the alignment window of the fourthorder difference signal.

The morphology matching metric is computed by processing and controlmodule 110 using a subset of the fourth order difference signal samplepoints within the alignment window. The processing and control module110 measures an R-wave width from the fourth order difference signal anddetermines a number of sample points to use for computing the morphologymatch metric based on the fourth order difference signal R-wave widthfor the current beat. These techniques are further described inconjunction with the flow charts presented herein with continuedreference to functional block diagram 100.

FIG. 4 is a flow chart 150 of a method for establishing a morphologytemplate according to one embodiment. At block 152, the subcutaneous ECGsignal is sensed by sensing module 102 using one or more electrodevectors selected from electrodes 26 and 28. Different morphologytemplates may be established for different sensing vectors and used forcomparison to unknown beats sensed from a respective sensing vector. Forexample, a template may be established for a sensing vector betweenelectrodes 28 a and 26, a sensing vector between electrodes 28 b and 26,and a sensing vector between electrodes 28 c and 26, referred torespectfully as ECG1, ECG2 and ECG3. During cardiac monitoring, if theECG1 sensing vector is used to sense cardiac signals, the templateestablished for ECG1 will be used to perform morphology matchinganalysis and so on.

One or more sensing vectors may be available depending on the particularlead and electrode configuration being used. For example, one or morehousing-based electrodes may be available and/or one or moreextravascular lead-based electrodes may be available for selectingvarious combinations of subcutaneous ECG sensing vectors using anycombination of one or more housing-based electrodes and/or lead-basedelectrodes.

A sensing vector may be coupled to one or more sensing channels insensing module 102. For example, sensing module 102 may include multiplesensing channels having different frequency bandwidths. A selectedsensing vector may be coupled to a narrow-band channel and/or awide-band channel when multiple frequency bandwidth channels areavailable. Techniques described herein may use a template generated froma relatively wide-band sensing channel or a relatively narrow-bandsensing channel for determining similarity between an unknown beat and aknown template.

At block 154, a desired number of sample points from the raw ECG signalare buffered in memory 112. The buffered sample points include n points,for example 26 points, prior to and after an R-wave sense signal, for atotal of 53 sample points centered on the R-wave sense signal. Thesesample points centered on the R-wave sense signal define an alignmentwindow which is used in aligning a desired number of cardiac cycles forgenerating the template.

Sample points are stored for a desired number of cardiac cycles to beused in generating a morphology template, for example 10 cardiac cycles(corresponding to ten sensed R-waves). The sample points acquired atblock 154 are stored from cardiac cycles identified during a knowncardiac rhythm. For example, the sample points may be stored during anormal sinus rhythm (NSR) that is verified based on regular R-Rintervals typical of NSR. In other embodiments, morphology templates maybe established at multiple heart rates and/or different known rhythms.

The cardiac cycles selected for buffering in memory 112 may be selectedautomatically by processing and control module 110 based on R-Rintervals, noise analysis, or other criteria. In other embodiments, thedesired number of cardiac cycles is identified manually by a clinicianthrough visual analysis of ECG signals transmitted by communicationmodule 106 to programmer 20. Accordingly, some aspects of the techniquesdescribed herein may be performed by a processor included in programmer20 using data retrieved from IMD 14. The programmer 20 may perform thecomputations necessary to establish a morphology template for one ormore ECG sensing vectors and the template data may be transmitted tocommunication module 106 by wireless telemetry and stored in memory 112.

At block 156, the fourth order difference signal for each of the storedcardiac cycles is computed from the buffered sample points. The fourthorder difference signal is used in processing subcutaneous ECG signalsto enhance the ECG signal frequency components in the range betweenapproximately 13 and 41 Hz, which is the frequency range containing themost energy of the subcutaneous ECG signal.

In contrast, intracardiac electrogram (EGM) signals sensed usingintracardiac electrodes carried by transvenous leads, for example, willcontain a higher energy component at a higher frequency bandwidth,making morphology waveform analysis of EGM signals more sensitive tohigh frequency noise, such as muscle noise and electromagneticinterference. A second order difference equation has been proposed to beapplied to EGM signals to reduce the high frequency noise effects.Reference is made to commonly-assigned pre-grant U.S. Publication No.2012/0289846 (Zhang et al.). Additionally, when a wavelet morphologyanalysis is performed on the EGM signal, the waveform is decomposed intodifferent frequency components, for example 5 frequency components. Thecontribution of the lower frequency components becomes amplified in thedecomposed waveform. The proposed second order difference equationattenuates the artificially exaggerated low frequency components andattenuates the high frequency (noise) components in the wavelet analysisof the EGM signal.

The fourth order difference signal of the raw subcutaneous ECG signal,on the other hand, provides attenuation of very low frequencycomponents, near baseline such as baseline wander, to enhance therelatively low frequency signal content in the ECG signal. Themorphology analysis of the ECG signal is less sensitive to highfrequency noise than the intracardiac EGM signal because of the higherenergy content in a relatively lower frequency bandwidth than the higherfrequency bandwidth of the EGM signal. Accordingly, the fourth orderdifference signal is derived from the raw ECG signal to address theunique challenges of aligning the ECG sample points and to enhance thelow frequency signal content while attenuating very low frequencycontent to improve morphology analysis outcomes.

At block 158, the maximum pulse of the fourth order difference signalfor each beat is identified. To identify pulses within the alignmentwindow, pulse criteria may be established, such as a pulse width equalto at least some minimum number of sample points and a pulse amplitudeof at least some minimum amplitude. The pulse having the maximumabsolute amplitude is identified as being the dominant pulse of thefourth order difference signal, and its polarity (positive or negative)is determined. As used herein, the “dominant pulse” refers to the pulsehaving a maximum absolute peak amplitude within the alignment window.The maximum peak of the dominant pulse within the alignment window isdefined as the alignment point for the given cycle. It is contemplatedthat other features of the fourth order difference signal could beidentified to use as alignment points. For example, a zero crossing ofthe dominant pulse in the fourth order difference signal could be analternative alignment point.

The dominant pulse maximum peak amplitude sample points having the samepolarity are identified from each of the X cycles of sample points asalignment points. The X cycles are aligned by choosing one cycle as areference then determining an alignment shift for each of the other X−1cycles. The alignment shift is computed for a given cycle as the samplepoint difference between the alignment point of the reference cycle andthe alignment point of the given cycle. The raw digitized data signalfor each cycle is shifted over the alignment window by the alignmentshift for the respective cycle. Alternatively, the fourth orderdifference signals are aligned over the alignment window based on theidentified alignment points.

Once aligned, the X cycles of signal sample points are ensemble averagedto obtain a template at block 164 for the known cardiac beat type. Inone embodiment, the template is an ensemble average of the raw ECGsignal sample points for each beat after aligning the raw ECG signalsamples for each beat using the computed alignment shift for each beat,derived from the fourth order difference signals. In other words, thealignment shifts are computed as a number of sample points required toalign a fourth order difference signal maximum pulse with a fourth orderdifference maximum pulse of the reference cycle, where both maximumpulses have the same polarity, and this shift is applied to the ECGsignal. Alternatively, the alignment shifts are applied to the fourthorder difference signals and the template is computed as an ensembleaverage of the aligned fourth order difference signals. In someembodiments, templates of both the raw ECG signal and the fourth orderdifference signal are generated.

The fourth order difference signal is therefore used to align the samplepoints of either the raw ECG signal for X beats or the fourth orderdifference signal for X beats. Those aligned X beats are then ensembleaveraged to establish a known morphology template. The template isstored at block 165. Templates may be generated and stored for one ormore selected ECG sensing vectors as mentioned previously.

At block 166, a template alignment point is identified which will beused to align the template with the unknown cardiac cycle signals duringmorphology analysis performed for tachyarrhythmia detection. In oneembodiment, the fourth order difference signal of the template iscomputed, when the template is the ensemble average of the raw ECGsignal. A template alignment point, such as the maximum pulse peakamplitude point, and its respective polarity are identified. Thistemplate alignment point (and polarity) is stored at block 168 in memory112.

FIG. 5 is example recordings 180 and 182 of ECG signal waveforms alignedusing two different techniques. The same subcutaneous ECG recordings 180and 182 for 10 cardiac cycles are shown in the right and left panels,the right panel having a different vertical scale than the left panel.As can be seen in recordings 180, the R-wave has a double peak in thisexample in all ten cycles. The double peak is more pronounced in somecycles than in others, and the first peak is sometimes greater than andsometimes less than the second peak. The recordings 180 shown in theleft panel are aligned in time based on the timing of the R-wave sensesignal for each beat. As can be observed, considerable “jittering” ofthe R-wave is present when the signals are aligned based on the R-wavesense signal. Similarly, waveform alignment based on a peak amplitude ofthe raw ECG signal will result in considerable variation in thealignment point within the R-wave.

To address this variation in alignment of R-waves, the fourth orderdifference signal is generated for each cycle and a maximum pulse peakamplitude sample point is identified as an alignment point rather thanthe R-wave sense signal point. The maximum pulse peak amplitude samplepoints having the same polarity are selected for aligning the tencycles. As described above, an alignment shift is computed for each ofthe cycles relative to a reference cycle. The raw ECG signal may then bealigned by aligning the maximum pulse peak amplitudes of the fourthorder difference signals as shown in the recordings 182 in the rightpanel.

In the right panel, the same ten raw ECG signals are shown (smallervertical scale) with the alignment points 185 identified from the fourthorder difference signal (not shown) all aligned. Using an alignmentpoint from the fourth order difference signal alleviates alignment errorthat can result from using an R-wave sense signal or other alignmentpoints identified from the raw ECG signal. The template 186 is computedas the ensemble average of the ECG signal recordings 182 aligned basedon the maximum pulse peak amplitude of the fourth order differencesignals for each of the ten cycles.

FIG. 6 is a flow chart 200 of a method for aligning an ECG signal of anunknown beat with a known morphology template. At block 202, the ECGsignal is sensed by sensing module 102 using an electrode vector, forexample selected from electrodes 28 and 26. As described above, theprocessing and control module 110 receives digitized ECG signals andR-wave sense signals from the sensing module 102 and stores n pointsbefore and n points after the sample point on which the R-wave senseoccurs in a buffer in memory 112. The 2n+1 sample points define analignment window within which an alignment point will be identified foralignment with the established template. In one embodiment, thealignment window is 53 sample points centered on the R-wave sense point.These sample points are stored in a memory buffer at block 204.

In some embodiments, the buffered signals will be used to performmorphology analysis when a fast heart rate is detected. Accordingly, atdecision block 206, the processing and control module 110 may determineif a fast rate is being detected based on tachyarrhythmia detectioncriteria, for example a minimum ratio of R-R intervals shorter than atachyarrhythmia detection interval. If a fast rate is not beingdetected, the ECG signal sensing continues without performing beatalignment for morphology analysis.

The application of rate criteria at block 206 prior to performing amorphology analysis, however, is optional in that the techniquesdescribed herein for establishing a known template, aligning an unknownbeat with the established template and computing a morphology metric asa measure of the similarity between the template and the unknown beatmay be integrated into a tachyarrhythmia detection algorithm in avariety of ways. The morphology analysis may therefore be initiated ortriggered in response to a variety of sensed events or conditions; afast rate based trigger being just one example of how the morphologyanalysis techniques may be incorporated in a tachyarrhythmia detectionalgorithm.

If the rate criteria or other morphology analysis triggering conditionis detected, the processing and control module 110 computes a fourthorder difference signal at block 208 from the buffered signal sampledata. The maximum slope of the fourth order difference signal may bedetermined at block 210 and compared to a threshold, e.g. approximately136 analog-to-digital (A/D) conversion units. If the slope threshold isnot met, the signal may be rejected as a weak signal and no furtheranalysis of that beat is performed. If the maximum slope is greater thanthe threshold, at least one pulse corresponding to an R-wave is likelyto be present in the alignment window

If a slope threshold is met at block 210, pulses within the alignmentwindow are identified at block 212. The number of pulses identified, orlack thereof, within the alignment window may be used to reject a“cardiac cycle” as a noisy cycle or a weak signal. One or more pulses,including negative-going and positive-going pulses, may be identifiedaccording to amplitude and pulse width criteria. In some examples, apulse may be identified based on a slope, maximum peak amplitude(positive or negative), pulse width or any combination thereof. If athreshold number of pulses is identified within the alignment window,the cycle may be considered a noisy cycle. While not shown explicitly inFIG. 6, a noisy cycle may be flagged or rejected for use in morphologyanalysis.

After identifying all pulses from the fourth order difference signal inthe alignment window, a pulse having a maximum pulse amplitude andhaving the same polarity as the template alignment point is identifiedat block 214. The sample point having the maximum pulse amplitude(absolute value) that also matches the polarity of the templatealignment point is identified and defined as the unknown signalalignment point.

An alignment shift is computed at block 216 as the difference in samplepoint number between the alignment point identified at block 214 and thepreviously established template alignment point. The alignment shift isthe number of sample points, that the unknown beat must be shifted inorder to align the unknown signal alignment point with the templatealignment point. The alignment shift is applied at block 218 by shiftingthe unknown beat sample points to align the unknown beat and thetemplate over the alignment window. The alignment shift may be appliedto the fourth order difference signal itself if the template is storedas an ensemble average of aligned fourth order difference signals orstored as the fourth order difference signal of an ensemble average ofaligned raw ECG signals. The alignment shift may additionally oralternatively be applied to the digitized raw signal sample points ofthe unknown signal when the template is the ensemble average of the rawsignal sample points acquired during a known rhythm and aligned usingthe fourth order difference signal as described above in conjunctionwith FIGS. 4 and 5. In another variation, the template may be the fourthorder difference signal of the ensemble averaged raw signals, and thefourth order difference signal of the unknown raw signal is aligned withthe fourth order difference template.

Fourth order difference signals computed for deriving a templatealignment point and the unknown cardiac signal alignment point may becomputed using signals sensed from either a narrow-band channel or awide-band channel when different frequency bandwidth channels areincluded in sensing module 102. The alignment points may then be appliedto a template derived from either the narrow-band or the wide-bandchannel and the unknown cardiac signal sensed from the correspondingnarrow-band or wide-band channel. As such, different frequency bandwidthchannels may be used in various combinations for generating a template,identifying alignment points and measuring a similarity between anunknown cardiac cycle signal and the template.

FIG. 7 is a flow chart 300 of a method for computing a morphology metricto determine the similarity between a known template aligned with anunknown cardiac cycle signal according to one embodiment. After aligningthe unknown cardiac cycle signal, also referred to herein as the“unknown beat” and the template using the fourth order difference signalalignment points, the morphology between the unknown beat and thetemplate is compared. Numerous types of morphology analysis could beused, such as wavelet analysis, comparisons of fiducial points (peakamplitude, zero crossings, maximum slopes, etc.) or other techniques. Inone embodiment, a NWAD is computed using a morphology analysis windowthat is a subset of, i.e. a number of sample points less than, thealignment window.

The operations performed by the processing and control module 110 asdescribed in conjunction with FIG. 7 may be performed on the aligned rawsignal and corresponding template and/or the aligned fourth orderdifference signal and corresponding fourth order difference signaltemplate. At block 302, the R-wave width of the unknown signal isdetermined. The R-wave width may be measured using a number oftechniques.

In an illustrative embodiment the maximum positive pulse and the maximumnegative of the fourth order difference signal are identified. Themaximum positive pulse is an identified pulse having positive polarityand maximum positive peak value; the maximum negative pulse is anidentified pulse having negative polarity and maximum absolute peakvalue. If the R wave has a positive polarity in the raw ECG signal, themaximum positive pulse will precede the maximum negative pulse on the4^(th)-order difference waveform. An onset threshold is set based on theamplitude of the maximum positive pulse and an offset threshold is setbased on the amplitude of the maximum negative pulse. For example,one-eighth of the peak amplitude of the maximum positive pulse may bedefined as the onset threshold and one eighth of the negative peakamplitude of the maximum negative pulse may be defined as the offsetthreshold.

The onset of the R-wave is identified as the first sample point to theleft of the maximum positive pulse (e.g. moving from the pulse peakbackward in time to preceding sample points) to cross the onsetthreshold. The offset of the R-wave is identified as the first samplepoint to the right of the maximum negative pulse crossing the offsetthreshold. The R-wave width is the difference between the onset samplepoint number and the offset sample point number, i.e. the number ofsampling intervals between onset and offset.

For an R-wave having a negative polarity on the raw waveform, themaximum negative pulse will precede the maximum positive pulse on thefourth order difference signal. As such, the onset threshold is set as aproportion of the maximum negative peak amplitude of the maximumnegative pulse of the fourth order difference signal, and the offsetthreshold is set as a proportion of the maximum positive peak amplitudeof the maximum positive pulse. The R-wave onset is detected as the firstsample point to cross the onset threshold when moving left (earlier intime) from the maximum negative peak. The R-wave offset is detected asthe first sample point to cross the offset threshold moving right (laterin time) from the maximum positive peak. The R-wave width is thedifference between the onset sample point and the offset sample point.This method of computing an R-wave width based on onset and offsetpoints identified from the fourth order difference signal is illustratedin FIG. 9

The morphology analysis window is set at block 304 in response to theR-wave width determined from the fourth order difference signal. Themorphology of the R-wave itself is of greatest interest in classifyingthe unknown beat. Processing time can be reduced by comparing only thesample points of greatest interest without comparing extra points, forexample baseline points or Q- or S-wave points, preceding or followingthe R-wave. The morphology analysis window is therefore a proportion ofthe sample points that is less than the total number of sample pointsaligned in the alignment window.

In one embodiment, different ranges of R-wave width measurements may bedefined for which different respective sample numbers will be used toset the morphology analysis window. For example, if the R-wave width isgreater than 30 sample intervals, the morphology analysis window is setto a first number of sample points. If the R-wave width is greater than20 sample intervals but less than or equal to 30 sample intervals, themorphology analysis window is set to a second number of sample pointsless than the first number of sample points. If the R-wave width is lessthan or equal to 20 sample points, the morphology analysis window is setto a third number of sample points less than the second number of samplepoints. Two or more R-wave width ranges may be defined, each with acorresponding number of sample points defining the morphology analysiswindow. At least one of the R-wave width ranges is assigned a number ofsample points defining the morphology analysis window to be less thanthe alignment window. In some embodiments all of the R-wave width rangesare assigned a number of sample points defining the morphology analysiswindow to be less than the alignment window.

In the example given above, the alignment window is 53 sample points. Ifthe R-wave width is greater than 30 sample intervals, the morphologywindow is defined to be 48 sample points. The morphology analysis windowmay include 23 points preceding the R-wave sense point, the R-wave sensepoint itself, and 24 points after the R-wave sense point. If the R-wavewidth is greater than 20 but less than or equal to 30 sample intervals,the morphology window is defined to be 40 sample points (e.g. 19 beforethe R-wave sense point and 20 after the R-wave sense signal). If theR-wave width is less than or equal to 20 sample intervals, the window isdefined to be 30 sample points (e.g. 14 before and 15 points after theR-wave sense point and including the R-wave sense point).

In other embodiments, the number of sample points in the morphologyanalysis window may be defined as a fixed number of sample pointsgreater than the R-wave width, for example the R-wave width plus 12sample points. In another example, the number of sample points definingthe morphology analysis window may be computed as the R-wave width plusa rounded or truncated percentage of the R-wave width. For example, themorphology analysis window may be defined as the R-wave width plus fiftypercent of the R-wave width (i.e. 150% of the R-wave width), up to amaximum of the total alignment window or some portion less than thetotal alignment window.

The morphology window is applied to both the unknown beat and thetemplate. With the template and unknown cardiac signal aligned withinthe alignment window, the same number of sample points taken prior toand after the unknown beat alignment point is taken prior to and afterthe template alignment point.

After setting the morphology analysis window, a morphology metric of thesimilarity between the unknown signal and the template is computed atblock 306. In one embodiment, the NWAD is computed. Different methodsmaybe used to compute a NWAD. In an illustrative method, the NWAD iscomputed by normalizing the absolute amplitude of each of the unknownbeat sample points and the template sample points within the morphologywindow by a respective absolute maximum peak amplitude value. A waveformarea difference is then calculated by summing the absolute amplitudedifferences between each aligned pair of normalized sample points in theunknown signal and in the template over the morphology window.

This waveform area difference may be normalized by a template area. Thetemplate area is computed as the sum of all of the absolute values ofthe normalized template sample points in the morphology window. The NWADis then calculated as the ratio of the waveform area difference to thetemplate area. The NWAD for the aligned signals is stored.

This NWAD may be compared to a threshold to classify the unknown beat asmatching the template based on a high correlation between the unknownbeat and the template evidenced by a NWAD exceeding a match threshold.One or more NWADs may be computed for a given unknown beat. In theexample shown by flow chart 300, additional NWADs are computed byshifting the aligned template relative to the already aligned unknownsignal by one or more sample points at block 308. In one embodiment, thetemplate is shifted by one sample point to the right, two sample pointsto the right, one sample point to the left and two sample points to theleft to obtain five different alignments of the template and unknownsignal. For each template alignment, i.e. with alignment points alignedexactly and with template and unknown signal alignment points shiftedrelative to each other by one point and two points in each direction, aNWAD is computed at block 310. In this way, five NWADs are computed tomeasure the similarity between the unknown beat and the template (inaligned and shifted positions).

At block 312, the NWAD having the greatest value is selected as themorphology metric for the unknown beat and is compared to a matchthreshold. If the maximum NWAD meets or exceeds the match threshold, thebeat is classified as originating in the same chamber as the knowntemplate. For example, if a NSR template is established, the beat isclassified as a supraventricular beat when the NWAD meets the morphologymatch threshold. Otherwise, the unknown beat is classified as a VT/VFbeat.

This beat classification continues for a required number of beats todetermine if VT/VF detection criteria are satisfied. For example, oncerate-based detection criteria are met, a required number of consecutiveor non-consecutive VT/VF beats classified according to the methodsdescribed herein may confirm a VT/VF detection. If satisfied, theprocessing and control module controls the signal generator to deliver adefibrillation shock therapy to treat the detected VT/VF.

FIG. 8 is a plot 400 of an aligned unknown signal 402 and template 404illustrating a technique for computing a NWAD according to oneembodiment. In this example, the unknown raw ECG signal 402 and the rawECG signal template 404 (ensemble average of n raw signals aligned usingfourth order difference signal) are used for determining a morphologymatch metric over a morphology analysis window 412. The width of themorphology analysis window 412 and the alignment of the unknown signal402 and template 404 are based on analysis of fourth order difference.

The raw ECG signal 402 provided to the processor and control module 110by the sensing module 102 is aligned with template 404 of the raw ECGsignal established during NSR. The template alignment point 406 isidentified from the ensemble averaged fourth order difference signal asthe maximum absolute pulse amplitude value. The unknown signal alignmentpoint 408 is identified from the fourth order difference signal of theunknown raw ECG signal 402. The unknown signal alignment point 408 isthe maximum absolute pulse amplitude value having the same polarity asthe template alignment point 406.

After aligning the template 404 with the unknown raw ECG signal 402 overan alignment window 410, a morphology window 412 is set. The morphologywindow 412 is a subset of, i.e. shorter than or fewer sample pointsthan, the alignment window 410. The morphology window 412 is set basedon an R-wave width measured from the fourth order difference signal ofthe unknown signal as described below in conjunction with FIG. 9. Themorphology analysis window 412 is set in response to the R-wave widthmeasurement as some sample number greater than the R-wave width, asdescribed above.

The template area 414 is computed as the sum of all of the normalizedabsolute values of the template sample points within the morphologyanalysis window 412. The values are normalized by the absolute value ofthe maximum amplitude of the template. The waveform area difference 416is computed as the summation of the absolute values of the differencesbetween the aligned normalized absolute values of the unknown ECG signalsample points and the normalized absolute values of the template samplepoints. The NWAD is the ratio of the waveform area difference 416 to thetemplate area 414.

FIG. 9 is a plot 500 of an unknown fourth order difference signal 502aligned with a fourth order difference template 504 illustrating atechnique for determining an R-wave width and computing a NWAD accordingto another embodiment. In this example, the fourth order differencesignal 502 of the unknown raw ECG signal is aligned with a fourth orderdifference signal template 504 for determining a morphology match metricover a morphology analysis window 512.

The unknown fourth order difference signal 502 is derived from theunknown raw ECG signal provided to the processor and control module 110by the sensing module 102 and is aligned with the fourth orderdifference template 504 established during NSR. The template alignmentpoint 506 is identified as the maximum absolute pulse amplitude value ofthe fourth order difference template. The unknown signal alignment point508 is identified as the maximum absolute pulse amplitude value havingthe same polarity as the template alignment point 506. The unknownfourth order difference signal 502 is shifted over the alignment window510 by an alignment shift required to align the unknown signal alignmentpoint 508 with the template alignment point 506 as shown.

After aligning the template 504 with the unknown fourth order differencesignal 502 over alignment window 510, a morphology window 512 is set.The morphology window 512 is a subset of the alignment window 510 and isbased on an R-wave width 540 measured from the unknown fourth orderdifference signal 502.

The R-wave width 540 is measured by determining the difference betweenan R-wave onset point 524 and an R-wave offset point 534 of the fourthorder difference signal 502 of the unknown beat. In order to determinean R-wave onset point 524, a maximum positive pulse peak amplitude 520is measured. An onset threshold 522 is set as a proportion of themaximum positive pulse peak amplitude 520. In one embodiment, the onsetthreshold 522 is set as one-eighth of the maximum positive pulse peakamplitude 520. The onset point 524 is identified as the first point tothe left of the maximum positive pulse peak crossing the onset threshold522, i.e. equal to or greater than the onset threshold 522. The offsetpoint 534 is identified by setting an offset threshold 532. The offsetthreshold is a proportion of a maximum negative pulse peak amplitude530. The offset point 534 is identified as the first point crossing theoffset threshold 532 to the right of the maximum negative pulse. Thedifference between the onset point 524 and the offset point 534 ismeasured as the R-wave width 540. The morphology analysis window 512 isset in response to the R-wave width measurement as some sample numbergreater than the R-wave width 540, as described previously.

In other examples, the maximum negative pulse may occur earlier in thealignment window than the maximum positive pulse. If this is the case,the onset threshold is set as a proportion of the maximum negative pulsepeak amplitude and the onset point is determined as the first pointcrossing the onset threshold to the left of the maximum negative peak.Likewise, the offset threshold is set as a proportion of the maximumpositive pulse peak amplitude, and the offset point is determined as thefirst point to the right of the maximum positive pulse to cross theoffset threshold.

The morphology analysis window 512 may be centered on an R-wave sensesignal. In some embodiments, the morphology analysis window 512,determined from the fourth order difference signal 502, is applied tothe unknown raw ECG signal aligned with a raw ECG signal template, forexample window 412 as shown in FIG. 8. The morphology match metric isdetermined from the raw ECG signal 402 and template 404. In the exampleshown in FIG. 9, the morphology analysis window 512 is applied to thefourth order difference signal 502; the morphology match metric isdetermined from the fourth order difference signal 502 and fourth orderdifference template 504.

The template area 514 is computed as the sum of all of the normalizedabsolute values of the template sample points within the morphologywindow 512. The values are normalized by the absolute value of themaximum amplitude of the template 504 (in this example point 508). Thewaveform area difference 516 is computed as the summation of theabsolute differences between the aligned normalized absolute values ofthe unknown fourth order difference signal sample points and thenormalized absolute values of the template sample points. The NWAD isthe ratio of the waveform area difference 516 and the template area 514.This NWAD is compared to a match threshold to classify the unknown beatcorresponding to the fourth order difference signal 502 as asupraventricular beat or a beat originating in the ventricles. Detectionof beats arising from the ventricles can be used in detecting shockabletachyarrhythmias, i.e. VT or VF originating in the ventricles.

Thus, a method and apparatus for performing morphology analysis fordetection and discrimination of tachyarrhythmias have been presented inthe foregoing description with reference to specific embodiments. It isappreciated that various modifications to the referenced embodiments maybe made without departing from the scope of the disclosure as set forthin the following claims.

1. A method for classifying cardiac beats for use in detecting cardiacrhythms, comprising: sensing a cardiac signal over a plurality ofcardiac cycles using a plurality of electrodes coupled to a sensingmodule; determining a template of a known cardiac signal in response tothe cardiac signal sensed over the plurality of cardiac cycles; sensingan unknown cardiac signal over an unknown cardiac cycle; determining afourth order difference signal; determining a template alignment pointand an unknown cardiac signal alignment point in response to the fourthorder difference signal; aligning the template and the unknown cardiacsignal across an alignment window by aligning the template alignmentpoint and the unknown cardiac signal alignment point; determining afirst morphology match metric between the aligned template and theunknown cardiac signal.
 2. The method of claim 1, wherein determiningthe template comprises: determining a fourth order difference signal inresponse to the cardiac signal over each of the plurality of cardiaccycles; determining an alignment point from the fourth order differencesignal of each of the plurality of cardiac cycles; aligning theplurality of cardiac cycle signals by aligning the alignment points ineach of the plurality of cardiac cycles; and averaging the alignedplurality of cardiac cycle signals.
 3. The method of claim 1, whereindetermining the template comprises: determining a fourth orderdifference signal in response to the cardiac signal over each of theplurality of cardiac cycles; determining an alignment point from thefourth order difference signal of each of the plurality of cardiaccycles; aligning the plurality of fourth order difference signals ofeach of the cardiac cycle signals by aligning the alignment points; andaveraging the aligned plurality of fourth order difference signals. 4.The method of claim 1, wherein determining the template alignment pointcomprises determining a peak amplitude and a polarity of a dominantpulse of a fourth order difference signal corresponding to the template.5. The method of claim 4, wherein determining the unknown cardiac signalalignment point comprises: determining an unknown fourth orderdifference signal of the unknown cardiac cycle signal; and determining apeak amplitude of a dominant pulse of the unknown fourth orderdifference signal that matches the polarity of the template alignmentpoint.
 6. The method of claim 1, further comprising: after aligning thetemplate alignment point and the unknown cardiac signal alignment point,shifting the template by shifting the template alignment point relativeto the unknown cardiac signal alignment point by at least one samplepoint; determining a second morphology match metric as a measure of asimilarity between the shifted template and the unknown cardiac signal;selecting a greatest one of the first morphology match metric and thesecond morphology match metric; and classifying the unknown cardiacsignal in response to the selected one of the first and secondmorphology match metrics.
 6. The method of claim 1, further comprising:after aligning the template alignment point and the unknown cardiacsignal alignment point, shifting the template a plurality of times byshifting the template alignment point relative to the unknown signalalignment point by at least one sample point to obtain a plurality ofalignments between the template and the unknown cardiac signal;determining a morphology match score for each one of the plurality ofalignments; determining a greatest one of the first morphology matchmetric and the morphology match metrics for the plurality of alignments;and classifying the unknown cardiac signal in response to the determinedone of the first morphology match metric and the morphology matchmetrics for the plurality of alignments.
 7. The method of claim 1,wherein determining the morphology match metric comprises determining anormalized waveform area difference between the aligned template and theunknown cardiac signal.
 8. The method of claim 1, wherein determiningthe morphology match metric comprises determining a fourth orderdifference signal corresponding to the template and a fourth orderdifference signal of the unknown cardiac signal; and determining themorphology match metric between the template fourth order differencesignal and the fourth order difference signal of the unknown cardiacsignal.
 9. A medical device for classifying cardiac beats for use indetecting cardiac rhythms, comprising: a plurality of electrodes forsensing an electrocardiogram (ECG) signal; a sensing module coupled tothe electrodes for sensing a cardiac signal over a plurality of cardiaccycles and an unknown cardiac signal over an unknown cardiac cycle; anda processor coupled to the sensing module and configured to: determine atemplate of a known cardiac signal in response to the cardiac signalsensed over the plurality of cardiac cycles; determine a templatealignment point and an unknown cardiac signal alignment point, whereindetermining the template alignment point and the unknown cardiac signalalignment point comprises determining a fourth order difference signal;align the template and the unknown cardiac signal across an alignmentwindow by aligning the template alignment point and the unknown cardiacsignal alignment point; and determine a first morphology match metricmeasuring a similarity between the aligned template and the unknowncardiac signal.
 10. The device of claim 9, wherein determining thetemplate comprises: determining a fourth order difference signal inresponse to the cardiac signal over each of the plurality of cardiaccycles; determining an alignment point in response to the fourth orderdifference signal of each of the plurality of cardiac cycles; aligningthe plurality of cardiac cycle signals by aligning the alignment pointsin each of the plurality of cardiac cycles; and averaging the alignedplurality of cardiac cycle signals.
 11. The device of claim 9, whereindetermining the template comprises: determining a fourth orderdifference signal in response to the cardiac signal over each of theplurality of cardiac cycles; determining an alignment point in responseto the fourth order difference signal of each of the plurality ofcardiac cycles; aligning the plurality of fourth order differencesignals of each of the cardiac cycle signals by aligning the alignmentpoints; and averaging the aligned plurality of fourth order differencesignals.
 12. The device of claim 9, wherein determining the templatealignment point comprises determining a peak amplitude and a polarity ofa dominant pulse of a fourth order difference signal corresponding tothe template.
 13. The device of claim 12, wherein determining theunknown cardiac signal alignment point comprises: determining an unknownfourth order difference signal from the unknown cardiac cycle signal;and determining a peak amplitude of a dominant pulse of the unknownfourth order difference signal that matches the polarity of the templatealignment point.
 14. The device of claim 9, wherein the processor isfurther configured to: determine an R-wave onset and an R-wave offset inresponse to a fourth order difference signal of the unknown cardiaccycle signal; determine an R-wave width in response to a the differencebetween the R-wave onset and the R-wave offset; determine a morphologyanalysis window in response to the R-wave width; and determine the firstmorphology match metric across the morphology analysis window.
 15. Thedevice of claim 14, wherein the morphology analysis window comprises afirst number of sample points of the unknown cardiac signal, and thealignment window comprises a second number of sample points of theunknown cardiac signal, the second number greater than the first number.16. The device of claim 9, wherein the processor is further configuredto: after aligning the template alignment point and the unknown cardiacsignal alignment point, shift the template by shifting the templatealignment point relative to the unknown cardiac signal alignment pointby at least one sample point; determine a second morphology match metricas a measure of a similarity between the shifted template and theunknown cardiac signal; determine a greatest one of the first morphologymatch metric and the second morphology match metric; and classifying theunknown cardiac signal in response to the determined one of the firstand second morphology match metrics.
 17. The device of claim 9, whereinthe processor is further configured to: after aligning the templatealignment point and the unknown cardiac signal alignment point, shiftthe template a plurality of times by shifting the template alignmentpoint relative to the unknown signal alignment point by at least onesample point to obtain a plurality of alignments between the templateand the unknown cardiac signal; determine a morphology match score foreach one of the plurality of alignments; determine a greatest one of thefirst morphology match metric and the morphology match metrics for theplurality of alignments; and classify the unknown cardiac signal inresponse to the determined one of the first morphology match metric andthe morphology match metrics for the plurality of alignments.
 18. Thedevice of claim 9, wherein determining the morphology match metriccomprises determining a normalized waveform area difference between thealigned template and the unknown cardiac signal.
 19. The device of claim9, wherein determining the morphology match metric comprises determininga fourth order difference signal corresponding to the template and afourth order difference signal of the unknown cardiac signal; anddetermining the morphology match metric between the template fourthorder difference signal and the fourth order difference signal of theunknown cardiac signal.
 20. A non-transitory, computer-readable mediumstoring a set of instructions, which when executed by a processor of amedical device causes the device to: sense a cardiac signal over aplurality of cardiac cycles using a plurality of electrodes coupled to asensing module; generate a template of a known cardiac signal inresponse to the cardiac signal sensed over the plurality of cardiaccycles; sense an unknown cardiac signal over an unknown cardiac cycle;determine a template alignment point and an unknown cardiac signalalignment point, wherein determining the template alignment point andthe unknown cardiac signal alignment point comprises determining afourth order difference signal; align the template and the unknowncardiac signal across an alignment window by aligning the templatealignment point and the unknown cardiac signal alignment point; anddetermine a morphology match metric measuring a similarity between thealigned template and the unknown cardiac signal.